Using atmospy to load an SMPS File


In [19]:
import atmospy

print ("atmospy v{}".format(atmospy.__version__))


atmospy v0.1.0

dN Distribution (from SMPS)


In [20]:
# Setup an instance of the io.SMPS class
raw = atmospy.io.SMPS()

# Load the file of choice
%time raw.load("../tests/data/SMPS_Number.txt")


CPU times: user 91.8 ms, sys: 3.89 ms, total: 95.6 ms
Wall time: 94.2 ms

dN Distribution


In [21]:
%time d = atmospy.aerosols.ParticleDistribution(histogram = raw.histogram, bins = raw.bins)

%time d.compute()

%time d.statistics()


CPU times: user 9.93 ms, sys: 1.74 ms, total: 11.7 ms
Wall time: 10.2 ms
CPU times: user 9.55 ms, sys: 1.27 ms, total: 10.8 ms
Wall time: 10.2 ms
CPU times: user 458 ms, sys: 7.93 ms, total: 466 ms
Wall time: 461 ms

In [24]:
d.stats['Number'].head()


Out[24]:
N Total Mean GM GSD
index
2016-07-27 10:55:47 148.973553 119.463463 100.673949 1.913051
2016-07-27 10:57:51 156.962077 113.179571 94.575854 1.946241
2016-07-27 10:59:51 153.911369 102.963447 77.151835 2.464284
2016-07-27 11:01:51 144.782278 112.479011 93.247512 1.977647
2016-07-27 11:10:07 130.507933 122.642984 102.040449 2.043396

In [25]:
d.data['dN'].head()


Out[25]:
Bin 0 Bin 1 Bin 2 Bin 3 Bin 4 Bin 5 Bin 6 Bin 7 Bin 8 Bin 9 ... Bin 91 Bin 92 Bin 93 Bin 94 Bin 95 Bin 96 Bin 97 Bin 98 Bin 99 Bin 100
index
2016-07-27 10:55:47 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 3.31174 2.53733 7.47391 1.28292 0.934639 4.88329 3.690040 0.970824 3.162940 2.23991
2016-07-27 10:57:51 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 4.45274 6.01509 3.57956 2.40033 2.289790 3.08258 1.556350 3.143430 0.174966 2.35769
2016-07-27 10:59:51 7.2512 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 4.30251 1.54204 3.26911 1.20016 5.342840 1.54129 2.334520 0.785857 0.000000 2.41756
2016-07-27 11:01:51 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 1.72908 1.24506 6.33078 2.71221 0.763263 3.91952 1.489400 1.941650 1.213770 2.41756
2016-07-27 11:10:07 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 3.56038 5.32061 4.72268 1.95619 4.519640 2.37246 0.926519 2.207760 3.968480 1.04141

5 rows × 101 columns


In [27]:
d.meta.head()


Out[27]:
Dp bin_left bin_right logDp dDp dlogDp
0 0.00661 0.006494 0.006732 -2.179799 0.000238 0.015625
1 0.00685 0.006732 0.006978 -2.164309 0.000247 0.015625
2 0.00710 0.006978 0.007234 -2.148742 0.000256 0.015623
3 0.00737 0.007234 0.007499 -2.132533 0.000265 0.015625
4 0.00764 0.007499 0.007774 -2.116907 0.000275 0.015625

In [ ]: